/*
 * @Description:公司简介
 * @Author: iamsmiling
 * @Date: 2021-06-15 14:54:22
 * @LastEditTime: 2021-06-15 17:58:50
 */

import 'package:credit_business_circle/R/R.dart';
import 'package:credit_business_circle/components/topic_card/topic_card.dart';
import 'package:credit_business_circle/domain/local/topic/topic_entity.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'company_profile_controller.dart';

class CompanyProfilePage extends GetView<CompanyProfileController> {
  const CompanyProfilePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("简介"),
        elevation: .5,
      ),
      body: Container(
        decoration: BoxDecoration(
            gradient: LinearGradient(colors: [
          R.color.ffffffff,
          R.color.fff5f5f5,
        ])),
        child: SingleChildScrollView(
          child: Container(
            margin: EdgeInsets.symmetric(
                horizontal: R.dimen.dp13, vertical: R.dimen.dp25),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text(
                  "在职公司：",
                  style: TextStyle(
                      fontSize: R.dimen.sp16,
                      color: R.color.ff111111,
                      fontWeight: FontWeight.w600),
                ),
                Container(
                  margin: EdgeInsets.only(top: R.dimen.dp5),
                  child: Text(
                    "江苏金陵科技集团有限公司",
                    style: TextStyle(
                        fontSize: R.dimen.sp15, color: R.color.ff333333),
                  ),
                ),
                Container(
                  margin:
                      EdgeInsets.only(top: R.dimen.dp24, bottom: R.dimen.dp13),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text(
                        "简介",
                        style: TextStyle(
                            fontSize: R.dimen.sp16,
                            color: R.color.ff111111,
                            fontWeight: FontWeight.w600),
                      ),
                      GestureDetector(
                        child: Text(
                          "修改",
                          style: TextStyle(
                              fontSize: R.dimen.sp14,
                              color: R.color.ff3d93fc,
                              fontWeight: FontWeight.w500),
                        ),
                      ),
                    ],
                  ),
                ),
                Container(
                  padding: EdgeInsets.only(
                      top: R.dimen.dp16,
                      bottom: R.dimen.dp15,
                      left: R.dimen.dp15,
                      right: R.dimen.dp10),
                  decoration: BoxDecoration(
                      border: Border.all(color: R.color.ffcccccc)),
                  child: Text(
                    "江苏金陵科技集团有限公司（以下简称金陵科技）位于六朝古都南京，始创于1984年；是国有控股高新技术企业、江苏省网络安全重点企业、首批涉密信息系统集成甲级资质企业。多年来深入研究大数据及应用展现、信息化与信息安全、智能感知及智能处理、网络可视化、特种通信等技术，为党政、能源、金融、电信、交通、文博等行业客户，提供了大量先进、可靠、安全、高质量、易扩展的产品和系统集成服务。",
                    style: TextStyle(
                        fontSize: R.dimen.sp12,
                        color: R.color.ff555555,
                        height: 1.5),
                  ),
                ),
                Container(
                  margin:
                      EdgeInsets.only(top: R.dimen.dp26, bottom: R.dimen.dp13),
                  child: Text(
                    "品牌",
                    style: TextStyle(
                        fontSize: R.dimen.sp16,
                        color: R.color.ff111111,
                        fontWeight: FontWeight.w600),
                  ),
                ),
                Wrap(
                  spacing: R.dimen.dp13,
                  runSpacing: R.dimen.dp13,
                  children: ["小米app", "格力空调"]
                      .map((e) => Container(
                            padding: EdgeInsets.symmetric(
                                vertical: R.dimen.dp6,
                                horizontal: R.dimen.dp13),
                            decoration: BoxDecoration(
                                borderRadius:
                                    BorderRadius.circular(R.dimen.dp5),
                                color: R.color.ff47d0a8),
                            child: Text(
                              e,
                              style: TextStyle(
                                  fontSize: R.dimen.sp14,
                                  color: R.color.ffffffff),
                            ),
                          ))
                      .toList(),
                ),
                Container(
                  margin:
                      EdgeInsets.only(top: R.dimen.dp26, bottom: R.dimen.dp13),
                  child: Text(
                    "已发布的合作信息",
                    style: TextStyle(
                        fontSize: R.dimen.sp16,
                        color: R.color.ff111111,
                        fontWeight: FontWeight.w600),
                  ),
                ),
                for (TopicEntity topic in controller.topics)
                  TopicCard(topic: topic)
              ],
            ),
          ),
        ),
      ),
      bottomNavigationBar: Container(
        margin: EdgeInsets.symmetric(
            horizontal: R.dimen.dp13, vertical: R.dimen.dp8),
        child: ElevatedButton(onPressed: () {}, child: Text("联系TA")),
      ),
    );
  }
}
